package com.bbx.api.sdk.net.passeger.conn;

import android.content.Context;

import com.bbx.api.sdk.model.comm.returns.line.Line;
import com.bbx.api.sdk.model.passanger.Return.CouponCount;
import com.bbx.api.sdk.net.base.BaseNetwork;
import com.bbx.api.sdk.net.base.GeneralParser;

import java.io.InputStream;

/**
 * 作者：严旭文 on 2016/12/21 15:25
 * 邮箱：420255048@qq.com
 * 获取线路plus
 */
public class LinePlusNet extends BaseNetwork {
    public LinePlusNet(Context context, String datas) {
        super(context, false);
        setData(datas);
    }
    public LinePlusNet(Context context) {
        super(context, false);
    }
    public void setData(String datas){
        super.setData(datas);
        url =LINE_PLUS_Url;
        InputStream inputStream = getContentWithPOST((datas));
        if (inputStream != null) {
            parser = new GeneralParser(context, inputStream);
        }
    }
    @Override
    public Object getData() {
        // TODO Auto-generated method stub
        return parser.getData(Line.class);
    }
}
